﻿using Domain.Context;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace WebUI.Models
{
    public class StoreManagerModel
    {
        public int StoreNum { get; set; }
        public string Name { get; set; }
        public int DaysWorked { get; set; }
        public int DaysSick { get; set; }
        public int DaysVacation { get; set; }
        public int DaysOff { get; set; }
        public int TotalDays { get; set; }
        public int DistrictID { get; set; }
        public decimal WeeklyLabor { get; set; }
        public bool Approved { get; set; }

        public StoreManagerModel() :
            this(new ManagerHours())
        { }

        public StoreManagerModel(ManagerHours entity)
        {
            DistrictID = entity.District?? 0;
            StoreNum = entity.StoreID;
            Name = entity.Name;
            DaysWorked = entity.DaysWorked;
            DaysSick = entity.DaysSick;
            DaysVacation = entity.DaysVacation;
            DaysOff = entity.DaysOther;
            Approved = entity.Approved;
            TotalDays = DaysWorked + DaysSick + DaysVacation + DaysOff;
        }
    }
}